In digital signal processing, samples are stored and processed as integers. This operation is called quantization. It maps the numeric range of the discrete samples onto a finite set of integers. Because of the difference between the actual value and the represented integer, the quantizer introduces noise in the original signal. We focused on scalar quantizers, that is, those where samples are quantized individually and independently.

If the signal's amplitude is bounded over the interval $$[A, B]$$ and uniformly distributed on this interval, the optimal $$R$$-bit quantizer is a uniform quantizer where the interval is divided into $$2^R$$ intervals of equal size and for which the optimal representation value for each subinterval is the subinterval midpoint. The error analysis is performed by modeling the resulting quantization error as a white noise source. The resulting signal-to-noise ratio is equal to $$6R$$ dB.

Quantization analysis becomes more complex for different input distributuions; in many practical cases, devices such as companders are used to "shoehorn" non-uniform inputs into standard uniform quantizers.